Skip to content

Quantum: add az quantum workspace user list command - #10215

Draft
Konstantin Averkiev (kaverkiev) wants to merge 4 commits into
Azure:mainfrom
kaverkiev:v-kaverkiev/workspace-user-list
Draft

Quantum: add az quantum workspace user list command#10215
Konstantin Averkiev (kaverkiev) wants to merge 4 commits into
Azure:mainfrom
kaverkiev:v-kaverkiev/workspace-user-list

Conversation

@kaverkiev

@kaverkiev Konstantin Averkiev (kaverkiev) commented Aug 13, 2026

Copy link
Copy Markdown

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️quantum
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd quantum workspace user list cmd quantum workspace user list added

Summary

Adds az quantum workspace user list to complete the az quantum workspace user command group. Lists the users, groups, and service principals with access to an Azure Quantum workspace.

Details

Lists Azure RBAC role assignments scoped to the workspace.
Supports --assignee, --assignee-object-id, and --role filters (reuses the existing workspace user params).
Adds an opt-in --include-inherited flag to also surface access inherited from the parent resource group and subscription (assignments granted above the workspace scope).

Testing

New unit tests: scope construction, --include-inherited pass-through, and table transformer.
Added a live user list check to the test_workspace_user scenario.
Manually verified against a live workspace (default vs --include-inherited).


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Konstantin Averkiev (@kaverkiev),
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@kaverkiev Konstantin Averkiev (kaverkiev) changed the title Quantum: Add workspace user list Quantum: add az quantum workspace user list command Aug 13, 2026

info = WorkspaceInfo(cmd, resource_group_name, workspace_name)
scope = _get_workspace_resource_id(info)
return list_role_assignments(cmd, assignee=assignee, assignee_object_id=assignee_object_id, role=role, scope=scope, include_inherited=include_inherited)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use only QUANTUM_WORKSPACE_DATA_CONTRIBUTOR_ROLE_ID for role here? I think we should not allow to pass role as an argument unless we have a good reason

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants